import request from "@/utils/request";
//药品列表
export function queryDrugsList() {
  return request({
    url: "drugs/list",
    method: "get",
  });
}

export function addDrugs(data) {
  return request({
    url: "drugs/add",
    method: "post",
    data: data,
  });
}

export function applyRefused(data) {
  return request({
    url: "/comm/drugs/apply/refuse",
    method: "post",
    data: data,
  });
}

export function queryDrugByName(drugname) {
  return request({
    url: "drugs/select/" + drugname,
    method: "get",
  });
}
//药品余量的变化
export function UpdateDrug(data) {
  return request({
    url: "drugs/computed",
    method: "put",
    data: data,
  });
}

export function applyDrug(data) {
  return request({
    url: "comm/drugs/apply",
    method: "post",
    data: data,
  });
}
